import QtQuick 2.0
import QtQuick.Particles 2.0

Rectangle {
    id: root;
    color: "black";

    Flickable {
        anchors.fill: parent;
        clip: true;
        contentWidth: width;
        contentHeight: flow.height;
        anchors.margins: 10;

        Flow {
            anchors.left: parent.left;
            anchors.right: parent.right;
            id: flow;
            spacing: 5;

            //生命周期
            ParticleItem {
                text: qsTr("Age");
                Age {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    advancePosition: true;
                    lifeLeft: 1200;
                    once: true;
                    Tracer {}
                }
            }

            //吸引力
            ParticleItem {
                text: qsTr("Attractor");
                Attractor {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    pointX: 0;
                    pointY: 0;
                    strength: 1.0;
                    Tracer {}
                }
            }

            //摩擦
            ParticleItem {
                text: qsTr("Friction");
                Friction {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    factor: 0.8;
                    threshold: 25;
                    Tracer {}
                }
            }

            //重力
            ParticleItem {
                text: qsTr("Gravity");

                Gravity{
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    magnitude: 50;
                    angle: 90;
                    Tracer {}
                }
            }

            //紊流
            ParticleItem {
                text: qsTr("Turbulence");

                Turbulence {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    strength: 100;
                    Tracer {}
                }
            }

            //漂移
            ParticleItem {
                text: qsTr("Wander-Position");

                Wander {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    affectedParameter: Wander.Position;
                    pace: 200;
                    yVariance: 240;

                    Tracer {}
                }
            }

            //漂移
            ParticleItem {
                text: qsTr("Wander-Velocity");

                Wander {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    affectedParameter: Wander.Velocity;
                    pace: 200;
                    yVariance: 240;

                    Tracer {}
                }
            }

            //漂移
            ParticleItem {
                text: qsTr("Wander-Acceleration");

                Wander {
                    anchors.horizontalCenter: parent.horizontalCenter;
                    width: 200; height: 200;
                    system: parent.particle;
                    affectedParameter: Wander.Acceleration;
                    pace: 200;
                    yVariance: 240;

                    Tracer {}
                }
            }

            //组目标
            ParticleItem {
                text: qsTr("Friction");
            }

            //子粒子
            ParticleItem {
                text: qsTr("Friction");
            }
        }
    }
}
